{% extends "base_generic.html" %}
{% block script %}
<script type="text/javascript" src="/js/ajaxfunctions.js"></script>
{% endblock %}
{% block content %}
    <div id="primaryContentContainer">
      <div id="primaryContent">
        <form name="newfilm" id="newform" method="post" action="/newfilm" />
        <h2>New Film</h2>
        <div>
          <div>
           <label><input type="button" name="btnload" id="btnload" value="Load IMDB" onclick="LoadIMDB();" /></label>
           <div id="loader" style="display:none;"><img src="/img/ajax-loader.gif" /></div>
          </div>
          <div>
           <label>Title</label>
          </div>
          <div>
           <input type="text" name="title" id="title" value="{{film.title}}" />
          </div>
          <div>
           <label>Year</label>
          </div>
          <div>
           <input type="text" name="year" id="year"  value="{{film.year}}" />
          </div>
          <div>
           <label>Director</label>
          </div>
          <div>
           <input type="text" name="director" id="director"  value="{{film.directorname}}" />
          </div>
          <div>
           <label>Actors</label>
          </div>
          <div>
           <input size="50" type="text" name="actors" id="actors"  value="{{film.actors|join:","}}" />
          </div>
          <div>
           <label>Genres</label>
          </div>
          <div>
           <input size="50" type="text" name="genres" id="genres"  value="{{film.genres|join:","}}" />
          </div>
          <div>
           <label>Poster</label>
          </div>
          <div id="poster"></div>
          <div>
           <label><input type="hidden" id="image" name="image" value="{{film.image}}" /><input type="submit" name="save" id="save" value="Save" /></label>
          </div>
        </div>
        <p><textarea cols="50" rows="5" name="plot" id="plot">{{film.plot}}</textarea></p>
      </div>
        </form>
    </div>
{% endblock %}
